import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from '../views/home/main.vue'
import HomeRoutes from '../views/home/router'
import typeMain from '../views/types/main'
import typeRoutes from '../views/types/router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: Main,
    redirect: '/index',
    children: [
      ...HomeRoutes
    ]
  },{
    path: '/type',
    name: 'typeMain',
    component: typeMain,
    redirect: '/type/index',
    children: [
      ...typeRoutes
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
